package cn.da.shuai.cool.finance.model;

import cn.da.shuai.cool.common.entity.EntityBase;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cool_budget_control")
public class CoolBudgetControl extends EntityBase {

    @TableField("id")
    private Long id;

    @TableField("department_id")
    private Long departmentId;

    @TableField("category")
    private String category;

    @TableField("fiscal_year")
    private Integer fiscalYear;

    @TableField("fiscal_month")
    private Integer fiscalMonth;

    @TableField("control_type")
    private String controlType; // HARD_LIMIT, SOFT_LIMIT, NOTIFICATION_ONLY, NO_CONTROL

    @TableField("threshold_percentage")
    private BigDecimal thresholdPercentage;

    @TableField("approval_required")
    private Boolean approvalRequired;

    @TableField("approval_workflow_id")
    private Long approvalWorkflowId;

    @TableField("notification_emails")
    private String notificationEmails;

    @TableField("active")
    private Boolean active;

    @TableField("allow_carryover")
    private Boolean allowCarryover;

    @TableField("carryover_limit_percentage")
    private BigDecimal carryoverLimitPercentage;

    @TableField("notes")
    private String notes;
}